package random.fox.p2p.model;


import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;
import random.fox.p2p.AppModule;
import random.fox.p2p.interactors.UserInfoInteractor;
import random.fox.p2p.presenter.UserInfoPresenter;
import random.fox.p2p.presenter.UserInfoPresenterImpl;
import random.fox.p2p.ui.ExpandFansView;
import random.fox.p2p.ui.ExpandPersonalitysView;
import random.fox.p2p.ui.UserInfoView;
import random.fox.p2p.ui.ExpandDynamicsView;
import random.fox.p2p.view.IUserInfoView;

/**
 * Created by delong on 2015/3/16.
 */

@Module(
        injects = {
                UserInfoView.class,
                ExpandPersonalitysView.class,
                ExpandDynamicsView.class,
                ExpandFansView.class
        },
        addsTo = AppModule.class
)
public class UserInfoModule {
    IUserInfoView iUserInfoView;

    public UserInfoModule(IUserInfoView iUserInfoView) {
        this.iUserInfoView = iUserInfoView;
    }

    @Provides
    @Singleton
    public IUserInfoView provideIUserInfoView() {
        return iUserInfoView;
    }

    @Provides
    @Singleton
    public UserInfoPresenter providePresenter(IUserInfoView iUserInfoView, UserInfoInteractor userInfoInteractor) {
        return new UserInfoPresenterImpl(iUserInfoView, userInfoInteractor);
    }
}
